<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件库 - 拖拽式建站平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        :root {
            --sidebar-width: 240px;
            --header-height: 64px;
            --primary-color: #3498db;
            --secondary-color: #2c3e50;
            --bg-color: #f5f6f7;
            --card-bg: #ffffff;
            --text-primary: #18191c;
            --text-secondary: #61666d;
            --text-muted: #9499a0;
            --border-color: #e3e5e7;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
        }
        
        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }
        
        /* 顶部导航栏 */
        .header {
            height: var(--header-height);
            background: var(--card-bg);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            border-bottom: 1px solid var(--border-color);
            z-index: 100;
        }
        
        .header-left {
            display: flex;
            align-items: center;
        }
        
        .sidebar-toggle {
            margin-right: 16px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 18px;
        }
        
        .logo {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }
        
        .logo i {
            margin-right: 10px;
            color: var(--primary-color);
        }
        
        .header-right {
            display: flex;
            align-items: center;
        }
        
        .header-action {
            margin-left: 16px;
            color: var(--text-secondary);
            cursor: pointer;
            position: relative;
        }
        
        .header-action:hover {
            color: var(--primary-color);
        }
        
        .badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger-color);
            color: white;
            font-size: 11px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .user-menu {
            display: flex;
            align-items: center;
            margin-left: 20px;
            cursor: pointer;
        }
        
        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 12px;
        }
        
        /* 主内容区域 */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        /* 侧边栏 */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--card-bg);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
            transition: all 0.3s ease;
        }
        
        .sidebar-menu {
            padding: 16px 0;
        }
        
        .menu-title {
            padding: 10px 20px;
            font-size: 13px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .menu-item {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }
        
        .menu-item:hover {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
        }
        
        .menu-item.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            border-left-color: var(--primary-color);
        }
        
        .menu-item i {
            margin-right: 12px;
            width: 18px;
            text-align: center;
        }
        
        /* 内容区域 */
        .content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }
        
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }
        
        .page-title {
            font-size: 24px;
            font-weight: 600;
        }
        
        .page-actions .btn {
            margin-left: 10px;
        }
        
        /* 筛选和搜索区域 */
        .filter-bar {
            background: var(--card-bg);
            border-radius: 4px;
            padding: 16px 20px;
            margin-bottom: 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            align-items: center;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }
        
        .search-box {
            position: relative;
            flex: 1;
            min-width: 200px;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 14px;
        }
        
        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }
        
        .filter-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .filter-tag {
            padding: 6px 12px;
            background: #f5f7fa;
            border-radius: 16px;
            font-size: 13px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .filter-tag:hover, .filter-tag.active {
            background: var(--primary-color);
            color: white;
        }
        
        /* 组件库区域 */
        .components-container {
            display: flex;
            flex: 1;
            gap: 20px;
        }
        
        /* 组件分类侧边栏 */
        .categories-sidebar {
            width: 200px;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }
        
        .categories-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            font-size: 16px;
            font-weight: 500;
        }
        
        .categories-list {
            overflow-y: auto;
            flex: 1;
        }
        
        .category-item {
            padding: 12px 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }
        
        .category-item:hover {
            background: rgba(52, 152, 219, 0.05);
        }
        
        .category-item.active {
            background: rgba(52, 152, 219, 0.1);
            border-left-color: var(--primary-color);
            color: var(--primary-color);
            font-weight: 500;
        }
        
        .category-icon {
            margin-right: 8px;
            width: 18px;
            text-align: center;
        }
        
        /* 组件网格 */
        .components-grid {
            flex: 1;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
        }
        
        .grid-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .grid-title {
            font-size: 16px;
            font-weight: 500;
        }
        
        .grid-count {
            font-size: 14px;
            color: var(--text-muted);
        }
        
        .components-items {
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 20px;
            overflow-y: auto;
            flex: 1;
        }
        
        .component-card {
            background: white;
            border-radius: 6px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .component-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
        }
        
        .component-card.selected {
            border: 2px solid var(--primary-color);
        }
        
        .component-preview {
            height: 120px;
            background: #f9fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            position: relative;
            overflow: hidden;
        }
        
        .component-preview img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        
        .component-preview-content {
            padding: 10px;
            text-align: center;
            width: 100%;
        }
        
        .component-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: var(--primary-color);
            color: white;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 10px;
        }
        
        .component-info {
            padding: 12px;
        }
        
        .component-name {
            font-weight: 500;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
        }
        
        .component-name i {
            margin-right: 6px;
            color: var(--primary-color);
        }
        
        .component-desc {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 8px;
            height: 36px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        
        .component-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .component-usage {
            font-size: 12px;
            color: var(--text-muted);
        }
        
        .component-action {
            padding: 4px 8px;
            background: var(--primary-color);
            color: white;
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
        }
        
        /* 组件详情面板 */
        .component-detail {
            width: 300px;
            background: var(--card-bg);
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }
        
        .detail-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
        }
        
        .detail-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
        }
        
        .detail-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }
        
        .detail-desc {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 16px;
        }
        
        .detail-meta {
            display: flex;
            gap: 16px;
        }
        
        .meta-item {
            display: flex;
            flex-direction: column;
        }
        
        .meta-label {
            font-size: 12px;
            color: var(--text-muted);
        }
        
        .meta-value {
            font-size: 14px;
            font-weight: 500;
        }
        
        .detail-content {
            padding: 20px;
            flex: 1;
            overflow-y: auto;
        }
        
        .detail-section {
            margin-bottom: 24px;
        }
        
        .section-title {
            font-size: 15px;
            font-weight: 500;
            margin-bottom: 12px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }
        
        .preview-container {
            background: #f9fafc;
            border-radius: 4px;
            padding: 16px;
            margin-bottom: 16px;
            min-height: 150px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .properties-list {
            list-style: none;
        }
        
        .property-item {
            padding: 8px 0;
            border-bottom: 1px solid var(--border-color);
        }
        
        .property-item:last-child {
            border-bottom: none;
        }
        
        .property-name {
            font-weight: 500;
            margin-bottom: 4px;
        }
        
        .property-desc {
            font-size: 13px;
            color: var(--text-secondary);
        }
        
        .detail-actions {
            padding: 16px 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 10px;
        }
        
        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn i {
            margin-right: 6px;
        }
        
        .btn-primary {
            background: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background: #2980b9;
        }
        
        .btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }
        
        .btn-outline:hover {
            background: #f5f7fa;
        }
        
        .btn-success {
            background: var(--success-color);
            color: white;
        }
        
        .btn-success:hover {
            background: #219653;
        }
        
        .btn-sm {
            padding: 4px 8px;
            font-size: 13px;
        }
        
        .btn-icon {
            width: 32px;
            height: 32px;
            padding: 0;
            justify-content: center;
        }
        
        .btn-icon i {
            margin-right: 0;
        }
        
        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-muted);
            grid-column: 1 / -1;
        }
        
        .empty-state i {
            font-size: 48px;
            margin-bottom: 16px;
            color: #d1d5db;
        }
        
        /* 响应式设计 */
        @media (max-width: 1200px) {
            .components-items {
                grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            }
        }
        
        @media (max-width: 992px) {
            .components-container {
                flex-direction: column;
            }
            
            .categories-sidebar {
                width: 100%;
                height: auto;
                margin-bottom: 20px;
            }
            
            .component-detail {
                width: 100%;
                height: auto;
            }
            
            .sidebar {
                position: fixed;
                left: -var(--sidebar-width);
                top: var(--header-height);
                bottom: 0;
                z-index: 90;
            }
            
            .sidebar.open {
                left: 0;
            }
            
            .overlay {
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 80;
                display: none;
            }
            
            .overlay.open {
                display: block;
            }
        }
        
        @media (max-width: 768px) {
            .filter-bar {
                flex-direction: column;
                align-items: stretch;
            }
            
            .search-box {
                min-width: auto;
            }
            
            .filter-tags {
                justify-content: center;
            }
            
            .components-items {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
                padding: 15px;
            }
            
            .page-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .page-actions {
                margin-top: 16px;
                width: 100%;
                display: flex;
                justify-content: space-between;
            }
            
            .page-actions .btn {
                margin-left: 0;
                flex: 1;
                margin: 0 5px;
            }
            
            .detail-meta {
                flex-direction: column;
                gap: 8px;
            }
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="header">
        <div class="header-left">
            <div class="sidebar-toggle">
                <i class="fas fa-bars"></i>
            </div>
            <div class="logo">
                <i class="fas fa-puzzle-piece"></i>
                拖拽建站后台
            </div>
        </div>
        
        <div class="header-right">
            <div class="header-action">
                <i class="fas fa-bell"></i>
                <span class="badge">3</span>
            </div>
            
            <div class="header-action">
                <i class="fas fa-envelope"></i>
                <span class="badge">5</span>
            </div>
            
            <div class="user-menu">
                <span>管理员</span>
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 主内容区域 -->
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-menu">
                <div class="menu-title">主导航</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-home"></i>
                    <span>控制台</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-paint-brush"></i>
                    <span>网站管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-file-alt"></i>
                    <span>页面管理</span>
                </a>
                <a href="#" class="menu-item active">
                    <i class="fas fa-th-large"></i>
                    <span>组件库</span>
                </a>
                
                <div class="menu-title">内容管理</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-newspaper"></i>
                    <span>文章管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-box"></i>
                    <span>产品管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-images"></i>
                    <span>媒体库</span>
                </a>
                
                <div class="menu-title">用户与权限</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-shield-alt"></i>
                    <span>角色权限</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                </a>
            </div>
        </div>
        
        <!-- 内容区域 -->
        <div class="content">
            <div class="page-header">
                <h1 class="page-title">组件库</h1>
                <div class="page-actions">
                    <button class="btn btn-outline">
                        <i class="fas fa-sync-alt"></i> 刷新
                    </button>
                    <button class="btn btn-primary">
                        <i class="fas fa-upload"></i> 上传组件
                    </button>
                </div>
            </div>
            
            <!-- 筛选和搜索区域 -->
            <div class="filter-bar">
                <div class="search-box">
                    <i class="fas fa-search search-icon"></i>
                    <input type="text" class="search-input" placeholder="搜索组件名称或功能...">
                </div>
                
                <div class="filter-tags">
                    <div class="filter-tag active">全部</div>
                    <div class="filter-tag">常用</div>
                    <div class="filter-tag">最新</div>
                    <div class="filter-tag">热门</div>
                    <div class="filter-tag">免费</div>
                    <div class="filter-tag">高级</div>
                </div>
            </div>
            
            <!-- 组件库区域 -->
            <div class="components-container">
                <!-- 组件分类侧边栏 -->
                <div class="categories-sidebar">
                    <div class="categories-header">组件分类</div>
                    <div class="categories-list">
                        <div class="category-item active">
                            <i class="fas fa-layer-group category-icon"></i>
                            全部组件
                        </div>
                        <div class="category-item">
                            <i class="fas fa-bars category-icon"></i>
                            导航组件
                        </div>
                        <div class="category-item">
                            <i class="fas fa-star category-icon"></i>
                            Hero组件
                        </div>
                        <div class="category-item">
                            <i class="fas fa-gem category-icon"></i>
                            功能特性
                        </div>
                        <div class="category-item">
                            <i class="fas fa-box category-icon"></i>
                            产品展示
                        </div>
                        <div class="category-item">
                            <i class="fas fa-newspaper category-icon"></i>
                            内容区块
                        </div>
                        <div class="category-item">
                            <i class="fas fa-question-circle category-icon"></i>
                            FAQ组件
                        </div>
                        <div class="category-item">
                            <i class="fas fa-window-minimize category-icon"></i>
                            页脚组件
                        </div>
                        <div class="category-item">
                            <i class="fas fa-shield-alt category-icon"></i>
                            安全认证
                        </div>
                        <div class="category-item">
                            <i class="fas fa-chart-bar category-icon"></i>
                            数据统计
                        </div>
                        <div class="category-item">
                            <i class="fas fa-users category-icon"></i>
                            团队展示
                        </div>
                        <div class="category-item">
                            <i class="fas fa-envelope category-icon"></i>
                            联系表单
                        </div>
                    </div>
                </div>
                
                <!-- 组件网格 -->
                <div class="components-grid">
                    <div class="grid-header">
                        <div class="grid-title">全部组件</div>
                        <div class="grid-count">24个组件</div>
                    </div>
                    
                    <div class="components-items">
                        <div class="component-card selected">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-bars" style="font-size: 32px;"></i>
                                    <p>导航栏组件</p>
                                </div>
                                <span class="component-badge">常用</span>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-bars"></i>
                                    顶部导航栏
                                </div>
                                <div class="component-desc">
                                    响应式导航菜单，支持多级下拉和移动端汉堡菜单
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 1.2k</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-star" style="font-size: 32px;"></i>
                                    <p>Hero组件</p>
                                </div>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-star"></i>
                                    Hero横幅
                                </div>
                                <div class="component-desc">
                                    醒目的首页横幅区域，包含标题、描述和行动按钮
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 987</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-gem" style="font-size: 32px;"></i>
                                    <p>特性组件</p>
                                </div>
                                <span class="component-badge">热门</span>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-gem"></i>
                                    功能特性展示
                                </div>
                                <div class="component-desc">
                                    三列布局的功能特性展示，包含图标、标题和简短描述
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 845</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-box" style="font-size: 32px;"></i>
                                    <p>产品组件</p>
                                </div>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-box"></i>
                                    产品网格
                                </div>
                                <div class="component-desc">
                                    网格布局的产品展示，支持图片、标题、价格和购买按钮
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 723</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-newspaper" style="font-size: 32px;"></i>
                                    <p>内容组件</p>
                                </div>
                                <span class="component-badge">最新</span>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-newspaper"></i>
                                    图文内容区块
                                </div>
                                <div class="component-desc">
                                    左图右文或右图左文的图文混排内容区块，支持多种布局
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 612</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-question-circle" style="font-size: 32px;"></i>
                                    <p>FAQ组件</p>
                                </div>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-question-circle"></i>
                                    常见问题解答
                                </div>
                                <div class="component-desc">
                                    可折叠的FAQ组件，支持问题分类和搜索功能
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 534</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-window-minimize" style="font-size: 32px;"></i>
                                    <p>页脚组件</p>
                                </div>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-window-minimize"></i>
                                    网站页脚
                                </div>
                                <div class="component-desc">
                                    多列布局的网站页脚，包含链接、联系信息和社会媒体图标
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 498</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="component-card">
                            <div class="component-preview">
                                <div class="component-preview-content">
                                    <i class="fas fa-shield-alt" style="font-size: 32px;"></i>
                                    <p>安全组件</p>
                                </div>
                                <span class="component-badge">高级</span>
                            </div>
                            <div class="component-info">
                                <div class="component-name">
                                    <i class="fas fa-shield-alt"></i>
                                    安全认证展示
                                </div>
                                <div class="component-desc">
                                    展示安全认证和信任标志，增强用户信任感
                                </div>
                                <div class="component-meta">
                                    <span class="component-usage">使用次数: 376</span>
                                    <span class="component-action">添加</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 组件详情面板 -->
                <div class="component-detail">
                    <div class="detail-header">
                        <div class="detail-title">
                            <i class="fas fa-bars"></i>
                            顶部导航栏
                        </div>
                        <div class="detail-desc">
                            响应式导航菜单，支持多级下拉和移动端汉堡菜单
                        </div>
                        <div class="detail-meta">
                            <div class="meta-item">
                                <span class="meta-label">版本</span>
                                <span class="meta-value">v2.1.0</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">更新日期</span>
                                <span class="meta-value">2023-08-20</span>
                            </div>
                            <div class="meta-item">
                                <span class="meta-label">评分</span>
                                <span class="meta-value">4.8/5.0</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="detail-content">
                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-eye"></i>
                                组件预览
                            </div>
                            <div class="preview-container">
                                <div style="text-align: center;">
                                    <i class="fas fa-bars" style="font-size: 48px; color: #3498db; margin-bottom: 10px;"></i>
                                    <p>导航栏组件预览</p>
                                    <div style="background: #e8f4ff; padding: 10px; border-radius: 4px; margin-top: 10px;">
                                        网站名称 | 首页 | 产品 | 关于 | 联系
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-list"></i>
                                组件属性
                            </div>
                            <ul class="properties-list">
                                <li class="property-item">
                                    <div class="property-name">导航样式</div>
                                    <div class="property-desc">支持浅色、深色和透明背景多种样式</div>
                                </li>
                                <li class="property-item">
                                    <div class="property-name">响应式设计</div>
                                    <div class="property-desc">自动适配桌面、平板和移动设备</div>
                                </li>
                                <li class="property-item">
                                    <div class="property-name">下拉菜单</div>
                                    <div class="property-desc">支持多级下拉菜单和Mega Menu</div>
                                </li>
                                <li class="property-item">
                                    <div class="property-name">固定顶部</div>
                                    <div class="property-desc">可选是否固定导航栏在页面顶部</div>
                                </li>
                                <li class="property-item">
                                    <div class="property-name">搜索功能</div>
                                    <div class="property-desc">内置搜索框和实时搜索建议</div>
                                </li>
                            </ul>
                        </div>
                        
                        <div class="detail-section">
                            <div class="section-title">
                                <i class="fas fa-code"></i>
                                使用说明
                            </div>
                            <p style="font-size: 14px; color: var(--text-secondary); line-height: 1.5;">
                                将此组件拖拽到页面画布中即可使用。可以通过右侧属性面板自定义导航链接、
                                样式和响应式行为。支持JSON数据导入导出，方便批量操作。
                            </p>
                        </div>
                    </div>
                    
                    <div class="detail-actions">
                        <button class="btn btn-primary" style="flex: 1;">
                            <i class="fas fa-plus"></i> 添加到页面
                        </button>
                        <button class="btn btn-outline btn-icon">
                            <i class="fas fa-heart"></i>
                        </button>
                        <button class="btn btn-outline btn-icon">
                            <i class="fas fa-share-alt"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 移动端遮罩层 -->
    <div class="overlay"></div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 侧边栏切换
            const sidebarToggle = document.querySelector('.sidebar-toggle');
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.overlay');
            
            sidebarToggle.addEventListener('click', function() {
                sidebar.classList.toggle('open');
                overlay.classList.toggle('open');
            });
            
            overlay.addEventListener('click', function() {
                sidebar.classList.remove('open');
                overlay.classList.remove('open');
            });
            
            // 分类项选择
            const categoryItems = document.querySelectorAll('.category-item');
            
            categoryItems.forEach(item => {
                item.addEventListener('click', function() {
                    categoryItems.forEach(i => i.classList.remove('active'));
                    this.classList.add('active');
                    
                    // 这里可以添加加载分类组件的代码
                    // loadComponentsByCategory(this.dataset.category);
                });
            });
            
            // 组件卡片选择
            const componentCards = document.querySelectorAll('.component-card');
            
            componentCards.forEach(card => {
                card.addEventListener('click', function() {
                    componentCards.forEach(c => c.classList.remove('selected'));
                    this.classList.add('selected');
                    
                    // 这里可以添加加载组件详情的代码
                    // loadComponentDetails(this.dataset.componentId);
                });
            });
            
            // 筛选标签选择
            const filterTags = document.querySelectorAll('.filter-tag');
            
            filterTags.forEach(tag => {
                tag.addEventListener('click', function() {
                    filterTags.forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                    
                    // 这里可以添加筛选组件的代码
                    // filterComponents(this.dataset.filter);
                });
            });
            
            // 添加组件按钮
            const addButtons = document.querySelectorAll('.component-action');
            
            addButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.stopPropagation(); // 阻止事件冒泡，避免触发卡片选择
                    const componentCard = this.closest('.component-card');
                    const componentName = componentCard.querySelector('.component-name').textContent;
                    
                    alert(`已将"${componentName}"添加到当前页面`);
                    
                    // 这里可以添加将组件添加到页面的代码
                    // addComponentToPage(componentCard.dataset.componentId);
                });
            });
            
            // 模拟数据加载
            function loadComponentsByCategory(category) {
                console.log('加载分类组件: ', category);
                // 实际应用中这里会发送API请求获取分类组件
            }
            
            function loadComponentDetails(componentId) {
                console.log('加载组件详情: ', componentId);
                // 实际应用中这里会发送API请求获取组件详情
            }
            
            function filterComponents(filter) {
                console.log('筛选组件: ', filter);
                // 实际应用中这里会筛选显示组件
            }
            
            function addComponentToPage(componentId) {
                console.log('添加组件到页面: ', componentId);
                // 实际应用中这里会将组件添加到当前编辑的页面
            }
        });
    </script>
</body>
</html>